package com.sayice.robotconflict.dto.req;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * 玩家
 *
 * @author shubing
 */
@Getter
@Setter
@ToString
public class PlayerReq implements Serializable {
    private static final long serialVersionUID = 1L;
    
    /**
     * 玩家名
     */
    @NotBlank(message = "玩家名不能为空")
    @Pattern(regexp = "^\\S{0,30}$", message = "玩家名格式不正确")
    private String name;
    
    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空")
    @Pattern(regexp = "^\\S{6,30}$", message = "密码格式不正确")
    private String password;
}
